//
//  MessageViewController.m
//  Hello
//
//  Created by Detailscool on 16/3/17.
//  Copyright © 2016年 Detailscool. All rights reserved.
//

#import "MessageViewController.h"
#import "QRCodeViewController.h"

@implementation MessageViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    [self setupBasic];
    
}

- (void)signInButtonClick {
    
    QRCodeViewController * qrVC = [[QRCodeViewController alloc]init];
    [self.navigationController pushViewController:qrVC animated:YES];
    
}

- (void)setupBasic {
    
    self.navigationItem.title = @"haha";
    self.view.backgroundColor = GlobalColor;
    
    UIButton * signInButton = [[UIButton alloc]init];
    [signInButton setBackgroundImage:[UIImage imageNamed:@"sign_in"] forState:UIControlStateNormal];
    signInButton.width = 20;
    signInButton.height = 20;
    [signInButton addTarget:self action:@selector(signInButtonClick) forControlEvents:UIControlEventTouchUpInside];
    UIBarButtonItem * signInItem = [[UIBarButtonItem alloc]initWithCustomView:signInButton];
    self.navigationItem.rightBarButtonItem = signInItem;
    
}

@end
